
package requests

import (
	"github.com/goravel/framework/contracts/http"
	"github.com/goravel/framework/contracts/validation"
)

type ArticleCategoryRequest struct {

	Pid string `json:"pid" form:"pid"`

	Title string `json:"title" form:"title"`

	Intr string `json:"intr" form:"intr"`

	Image string `json:"image" form:"image"`

	Status string `json:"status" form:"status"`

	Sort string `json:"sort" form:"sort"`

	IsDel string `json:"is_del" form:"is_del"`

	AddTime string `json:"add_time" form:"add_time"`

	Hidden string `json:"hidden" form:"hidden"`

}

func (r *ArticleCategoryRequest) Authorize(ctx http.Context) error {
	return nil
}

func (r *ArticleCategoryRequest) Rules(ctx http.Context) map[string]string {
	return map[string]string{

		"pid": "required",

		"title": "required",

		"intr": "required",

		"image": "required",

		"status": "required",

		"sort": "required",

		"is_del": "required",

		"add_time": "required",

		"hidden": "required",

	}
}

func (r *ArticleCategoryRequest) Messages(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *ArticleCategoryRequest) Attributes(ctx http.Context) map[string]string {
	return map[string]string{}
}

func (r *ArticleCategoryRequest) PrepareForValidation(ctx http.Context, data validation.Data) error {
	return nil
}
